package org.dinner.order.service.impl;

import java.util.List;

import org.dinner.order.dao.ShippingUnitDAO;
import org.dinner.order.model.ShippingUnit;
import org.dinner.order.service.ShippingUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ShippingUnitServiceImpl implements ShippingUnitService {
	@Autowired
	private ShippingUnitDAO shippingUnitDAO;
	
	@Transactional
	public ShippingUnit add(ShippingUnit item) {
		return shippingUnitDAO.add(item);
	}

	@Transactional
	public List<ShippingUnit> list() {
		return shippingUnitDAO.list();
	}

	@Transactional
	public ShippingUnit getById(int id) {
		return shippingUnitDAO.getById(id);
	}

	@Transactional
	public void remove(int id) {
		shippingUnitDAO.remove(id);
	}

}
